import Vue from 'vue'
import Touch from '../common/touch'

/*
 * 长按事件
 */
Vue.directive('longtap', {
  bind: function(el, binding) {
    const touch = new Touch(el, binding, 'longtap')
    touch.initialize()
  },
})

/*
 * 下滑事件
 */
Vue.directive('swipedown', {
  bind: function(el, binding) {
    const touch = new Touch(el, binding, 'swipedown')
    touch.initialize()
  },
})

/*
 * 上滑事件
 */
Vue.directive('swipeup', {
  bind: function(el, binding) {
    const touch = new Touch(el, binding, 'swipeup')
    touch.initialize()
  },
})
